//
//  weatherTableViewController.m
//  SmileWeather
//
//  Created by 申浩光 on 15/9/30.
//  Copyright (c) 2015年 陶天海. All rights reserved.
//

#import "weatherTableViewController.h"
#import "CenterViewController.h"

@interface weatherTableViewController (){
    Reachability *_hostReachability;//属性
}

@end

@implementation weatherTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
         self.tableView.layer.borderWidth = 1;
    self.tableView.layer.borderColor =[UIColor blackColor].CGColor;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell3"];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if ([self.mod.info[@"night"] count] == 0) {
        return 6;
    }else{
        return [self.mod.info[@"night"] count];
    }
  
    
}
- (NSString *)filePathWithName:(NSString *)fileName {
    
    NSString *docPath = [NSSearchPathForDirectoriesInDomains(9, 1, 1) lastObject];
    NSString *filePth = [docPath stringByAppendingPathComponent:fileName];
    return filePth;
    
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell3" forIndexPath:indexPath];
    
NSArray *brr = self.weatherArray[@"info"][@"day"];
     cell.textLabel.text = brr[indexPath.row];
   
     NSString *sting = [[weatherHandle shareWetherHandle]getWeather:@"等级" andIndex:indexPath.row];

    NSString *str = [NSString stringWithFormat:@"%@:%@",sting,cell.textLabel.text];

    cell.textLabel.text = str;
    cell.textLabel.textColor = [UIColor whiteColor];
    cell.backgroundColor = [UIColor clearColor];
     cell.textLabel.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:18];
    tableView.backgroundColor = [UIColor clearColor];
    tableView.showsVerticalScrollIndicator = NO;
   

    tableView.separatorStyle = NO;
    BlurImageView *blur = [[BlurImageView alloc]initWithFrame:CGRectMake(0, 0, tableView.frame.size.width,tableView.frame.size.height)];
    tableView.backgroundView = blur;
    return cell;
}




@end
